﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 调拨单表基础输入参数
/// </summary>
public class SystransferorderBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>
    [Required(ErrorMessage = "调拨单号不能为空")]
    public virtual string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "单据状态不能为空")]
    public virtual DocumentStatusEnum? DocumentStatus { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    [Required(ErrorMessage = "调拨申请日期不能为空")]
    public virtual DateTime ApplyDate { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public virtual string? FromWarehouse { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public virtual string? ToWarehouse { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "出库状态不能为空")]
    public virtual DocumentStatusEnum? OutStatus { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "入库状态不能为空")]
    public virtual DocumentStatusEnum? InStatus { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    [Required(ErrorMessage = "调拨数量不能为空")]
    public virtual int? TransferQuantity { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public virtual decimal? TransferAmount { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public virtual string? AgentName { get; set; }
    
    /// <summary>
    /// 调拨货品
    /// </summary>
    public virtual string? GoodsName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public virtual DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 调拨单表分页查询输入参数
/// </summary>
public class PageSystransferorderInput : BasePageInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    public DocumentStatusEnum? DocumentStatus { get; set; }
    
    /// <summary>
    /// 调拨申请日期范围
    /// </summary>
     public DateTime?[] ApplyDateRange { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public string? FromWarehouse { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public string? ToWarehouse { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    public DocumentStatusEnum? OutStatus { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    public DocumentStatusEnum? InStatus { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    public int? TransferQuantity { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public decimal? TransferAmount { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public string? AgentName { get; set; }
    
    /// <summary>
    /// 调拨货品
    /// </summary>
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间范围
    /// </summary>
     public DateTime?[] DeleteTimeRange { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 调拨单表增加输入参数
/// </summary>
public class AddSystransferorderInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [Required(ErrorMessage = "调拨单号不能为空")]
    [MaxLength(64, ErrorMessage = "调拨单号字符长度不能超过64")]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "单据状态不能为空")]
    public DocumentStatusEnum? DocumentStatus { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    [Required(ErrorMessage = "调拨申请日期不能为空")]
    public DateTime ApplyDate { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    [MaxLength(64, ErrorMessage = "调出仓库字符长度不能超过64")]
    public string? FromWarehouse { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    [MaxLength(64, ErrorMessage = "调入仓库字符长度不能超过64")]
    public string? ToWarehouse { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "出库状态不能为空")]
    public DocumentStatusEnum? OutStatus { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "入库状态不能为空")]
    public DocumentStatusEnum? InStatus { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    [Required(ErrorMessage = "调拨数量不能为空")]
    public int? TransferQuantity { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    public decimal? TransferAmount { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    [MaxLength(64, ErrorMessage = "经办人字符长度不能超过64")]
    public string? AgentName { get; set; }
    
    /// <summary>
    /// 调拨货品
    /// </summary>
    [MaxLength(512, ErrorMessage = "调拨货品字符长度不能超过512")]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(512, ErrorMessage = "备注字符长度不能超过512")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 调拨单表删除输入参数
/// </summary>
public class DeleteSystransferorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 调拨单表更新输入参数
/// </summary>
public class UpdateSystransferorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>    
    [Required(ErrorMessage = "调拨单号不能为空")]
    [MaxLength(64, ErrorMessage = "调拨单号字符长度不能超过64")]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>    
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "单据状态不能为空")]
    public DocumentStatusEnum? DocumentStatus { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>    
    [Required(ErrorMessage = "调拨申请日期不能为空")]
    public DateTime ApplyDate { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>    
    [MaxLength(64, ErrorMessage = "调出仓库字符长度不能超过64")]
    public string? FromWarehouse { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>    
    [MaxLength(64, ErrorMessage = "调入仓库字符长度不能超过64")]
    public string? ToWarehouse { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>    
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "出库状态不能为空")]
    public DocumentStatusEnum? OutStatus { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>    
    [Dict(nameof(DocumentStatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "入库状态不能为空")]
    public DocumentStatusEnum? InStatus { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>    
    [Required(ErrorMessage = "调拨数量不能为空")]
    public int? TransferQuantity { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>    
    public decimal? TransferAmount { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>    
    [MaxLength(64, ErrorMessage = "经办人字符长度不能超过64")]
    public string? AgentName { get; set; }
    
    /// <summary>
    /// 调拨货品
    /// </summary>    
    [MaxLength(512, ErrorMessage = "调拨货品字符长度不能超过512")]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(512, ErrorMessage = "备注字符长度不能超过512")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>    
    public DateTime? DeleteTime { get; set; }
    
}

/// <summary>
/// 调拨单表主键查询输入参数
/// </summary>
public class QueryByIdSystransferorderInput : DeleteSystransferorderInput
{
}

/// <summary>
/// 调拨单表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportSystransferorderInput : BaseImportInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [ImporterHeader(Name = "*调拨单号")]
    [ExporterHeader("*调拨单号", Format = "", Width = 25, IsBold = true)]
    public string Code { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [ImporterHeader(Name = "*单据状态")]
    [ExporterHeader("*单据状态", Format = "", Width = 25, IsBold = true)]
    public DocumentStatusEnum? DocumentStatus { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    [ImporterHeader(Name = "*调拨申请日期")]
    [ExporterHeader("*调拨申请日期", Format = "", Width = 25, IsBold = true)]
    public DateTime ApplyDate { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    [ImporterHeader(Name = "调出仓库")]
    [ExporterHeader("调出仓库", Format = "", Width = 25, IsBold = true)]
    public string? FromWarehouse { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    [ImporterHeader(Name = "调入仓库")]
    [ExporterHeader("调入仓库", Format = "", Width = 25, IsBold = true)]
    public string? ToWarehouse { get; set; }
    
    /// <summary>
    /// 出库状态
    /// </summary>
    [ImporterHeader(Name = "*出库状态")]
    [ExporterHeader("*出库状态", Format = "", Width = 25, IsBold = true)]
    public DocumentStatusEnum? OutStatus { get; set; }
    
    /// <summary>
    /// 入库状态
    /// </summary>
    [ImporterHeader(Name = "*入库状态")]
    [ExporterHeader("*入库状态", Format = "", Width = 25, IsBold = true)]
    public DocumentStatusEnum? InStatus { get; set; }
    
    /// <summary>
    /// 调拨数量
    /// </summary>
    [ImporterHeader(Name = "*调拨数量")]
    [ExporterHeader("*调拨数量", Format = "", Width = 25, IsBold = true)]
    public int? TransferQuantity { get; set; }
    
    /// <summary>
    /// 调拨金额
    /// </summary>
    [ImporterHeader(Name = "调拨金额")]
    [ExporterHeader("调拨金额", Format = "", Width = 25, IsBold = true)]
    public decimal? TransferAmount { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    [ImporterHeader(Name = "经办人")]
    [ExporterHeader("经办人", Format = "", Width = 25, IsBold = true)]
    public string? AgentName { get; set; }
    
    /// <summary>
    /// 调拨货品
    /// </summary>
    [ImporterHeader(Name = "调拨货品")]
    [ExporterHeader("调拨货品", Format = "", Width = 25, IsBold = true)]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 软删除时间
    /// </summary>
    [ImporterHeader(Name = "软删除时间")]
    [ExporterHeader("软删除时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? DeleteTime { get; set; }
    
}
